package cn.ywsj.ywsjmidtier.controller;

import cn.ywsj.ywsjmidtier.entity.VO.HotActivityQueryVo;
import cn.ywsj.ywsjmidtier.service.WechatHotActivityFeign;
import cn.ywsj.ywsjmidtier.utils.JsonObjectUtil;
import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "热门活动")
@RestController
@RequestMapping("/wechat/hotactivitymgr")
public class WechatHotActivityController {
    @Autowired
    private WechatHotActivityFeign activityFeign;

    /**
     * 热门活动1
     * @param start
     * @param pageSize
     * @return
     */
    @ApiOperation("热门活动")
    @PostMapping({"/ajaxhotactivity"})
    public String ajaxHotActivity(HotActivityQueryVo hotActivityQueryVo,Integer start, Integer pageSize) {
        JSONObject jsonObject = JsonObjectUtil.ObjectToJson(hotActivityQueryVo);
        return activityFeign.ajaxHotActivity(jsonObject,start,pageSize);
    }

}
